#ifndef __LINKLIST_H_
#define __LINKLIST_H_

#define Node_ElemenType int

struct Node
{
    Node_ElemenType data;
    struct Node *next;
};


struct LinkList
{
    struct Node *head;
    int len;
};

void InitLinkList(struct LinkList *list);
int InsertTail(struct LinkList *list,Node_ElemenType element);
int InsertHead(struct LinkList *list,Node_ElemenType element);
int InsertIndex(struct LinkList *list,Node_ElemenType element,int index);
void RemoveByIndex(struct LinkList *list,int index);
void RemoveByElement(struct LinkList *list,Node_ElemenType element);
Node_ElemenType *FindByIndex(struct LinkList *list,int index);
int *FindByElement(struct LinkList *list,Node_ElemenType element);
void SetValueByIndex(struct LinkList *list,Node_ElemenType element,int index);
void SetValueByElement(struct LinkList *list,Node_ElemenType oldvalue,Node_ElemenType newvalue);
void BubbleSort(struct LinkList *list);
void Reserve(struct LinkList *list);

struct Node *Reserves2(struct Node *node);


void FreeLinkList(struct LinkList *list);
void Travel(struct LinkList *list);
#endif